from songmanager import SongManager , Part
import instruments
import timings
import velocities 

s = SongManager()
s.setBPM( 120 )
#s.definePattern("A","X-x-x-|X-x-x-x-")
#s.definePattern("B","X-x-x-x|X-x-x-|X-x-")
s.definePattern("A","X-x-x-")
s.definePattern("B","X-x-x-x")

s.defineInstrument( "one" ,  instruments.SequenceInstrument( "g3" ) , timings.StandardTiming( normal = 0.01 ) , velocities.StandardVelocity( 120 , 80 , 10 ) )
s.defineInstrument( "two" ,  instruments.SequenceInstrument( "a3" ) , timings.StandardTiming( normal=0.01 ) , velocities.StandardVelocity( 120 , 80 , 10 ) )

s.defineTrack( "one" , 3 )

p = Part() 
p["one"].addPattern( "A" ,12 )
p["two"].addPattern( "B" ,12 )

s["one"].addPart( p )

s.run()
